/* Layout */
import Layout from '@/layout'
// import { Message } from 'element-ui'

// 动态路由
export const asyncRoutes = [
  {
    path: '/',
    component: Layout,
    redirect: '/home',
    meta: { title: '首页', icon: 'nav_home' },
    children: [{
      path: 'home',
      name: 'Home',
      component: () => import('@/views/home/index'),
      meta: { title: '首页', icon: 'nav_home', noCache: true }
    }]
  },
  {
    path: '/profile',
    component: Layout,
    redirect: '/profile/index',
    hidden: true,
    children: [
      {
        path: 'index',
        component: () => import('@/views/profile/index'),
        name: 'Profile',
        noCache: true,
        meta: { title: '个人中心', icon: 'user', noCache: true }
      }
    ]
  },
  {
    path: '/merchant',
    component: Layout,
    redirect: '/merchant/merchantAdmin',
    meta: { title: '商户管理', icon: 'nav_shanghu_sel' },
    children: [
      {
        path: 'merchantAdmin',
        name: 'MerchantAdmin',
        component: () => import('@/views/merchant/merchantAdmin/index'),
        meta: { title: '商户管理' }
      },
      {
        path: 'merchantAdminEdit',
        name: 'MerchantAdminEdit',
        hidden: true,
        component: () => import('@/views/merchant/merchantAdmin/edit'),
        meta: { title: '新增商户', hidden: true }
      },
      {
        path: 'merchantAdminDetail',
        name: 'MerchantAdminDetail',
        hidden: true,
        component: () => import('@/views/merchant/merchantAdmin/detail'),
        meta: { title: '商户详情', hidden: true }
      }
    ]
  },
  {
    path: '/wxThirdParty',
    component: Layout,
    redirect: '/wxThirdParty/manage',
    meta: { title: '小程序管理', icon: 'nav_xiaochengxu_sel' },
    children: [
      {
        path: 'wxThirdPartyManage',
        name: 'WxThirdPartyManage',
        component: () => import('@/views/wxThirdParty/manage/index'),
        meta: { title: '小程序管理' }
      },
      {
        path: 'wxThirdPartyTakeNotes',
        name: 'WxThirdPartyTakeNotes',
        component: () => import('@/views/wxThirdParty/takeNotes/index'),
        meta: { title: '代注册管理' }
      },
      {
        path: 'wxThirdPartyDaily',
        name: 'WxThirdPartyDaily',
        component: () => import('@/views/wxThirdParty/daily/index'),
        meta: { title: '小程序变更日志' }
      },
      {
        path: 'miniDetail',
        name: 'MiniDetail',
        component: () => import('@/views/wxThirdParty/manage/components/detail.vue'),
        meta: { title: '小程序详情', hidden: true },
        hidden: true
      }
    ]
  },
  {
    path: '/edition',
    component: Layout,
    redirect: '/edition/manage',
    meta: { title: '版本管理', icon: 'nav_banben_sel' },
    children: [
      {
        path: 'editionyManage',
        name: 'EditionyManage',
        component: () => import('@/views/edition/manage/index'),
        meta: { title: '版本管理' }
      },
      {
        path: 'editionyRelease',
        name: 'EditionyRelease',
        component: () => import('@/views/edition/release/index'),
        meta: { title: '版本发布管理' }
      },
      {
        path: 'editionPartyDaily',
        name: 'EditionPartyDaily',
        component: () => import('@/views/edition/daily/index'),
        meta: { title: '版本发布日志' }
      }
    ]
  }
]
